////////////////////////////////////////////////////////////////////////////////
// Filename: vector2d.hpp
////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES
#ifndef VECTOR2D_HPP_
#define VECTOR2D_HPP_

//////////////
// INCLUDES //
//////////////
#include "iostream"
#include "math.h"
#include <D3DX10math.h>

////////////////////////////////////////////////////////////////////////////////
// Class name: Vector2D
////////////////////////////////////////////////////////////////////////////////
class Vector2D {
public:
	Vector2D();
	Vector2D(float, float);
	Vector2D(const Vector2D&);
	~Vector2D();

	void Set(float, float);
	void SetX(float);
	void SetY(float);
	static Vector2D Add(Vector2D&, Vector2D&);
	static Vector2D Sub(Vector2D&, Vector2D&);
	static Vector2D Scale(Vector2D&, float);
	static Vector2D Normalize(Vector2D&);
	static Vector2D Project(Vector2D&, Vector2D&);
	static Vector2D Rot(Vector2D*, float);
	static float Length(Vector2D&);
	static float Distance(Vector2D&, Vector2D&);
	static float ScalarProduct(Vector2D&);
	static float ScalarProduct(Vector2D&, Vector2D&);
	float GetX();
	float GetY();
	Vector2D Copy();

private:
	friend std::ostream& operator<<(std::ostream&, const Vector2D&);
	Vector2D operator+(const Vector2D&);
	float x;
	float y;
};

#endif
